<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="title">
        FeedReader
    </ui:define>

    <ui:define name="description">
        FeedReader retrieves and displays content from a feed.
    </ui:define>

    <ui:param name="documentationLink" value="/components/feedreader"/>

    <ui:define name="implementation">
        <div class="card">
            <p:feedReader value="https://www.nasa.gov/rss/dyn/breaking_news.rss" var="feed">
                <div class="p-3">
                    <h:outputText value="#{feed.title}" styleClass="font-bold block" />
                    <h:outputText value="#{feed.description.value}" escape="false"/>
                    <p:divider/>
                </div>
                
                <f:facet name="error">
                    <h:outputText value="Error reading RSS Feed!!!" style="color:red;"/>
                </f:facet>
            </p:feedReader>
        </div>
    </ui:define>

</ui:composition>
